//
//  AppDelegate+CheckPermissions.h
//  ZZmetro
//
//  Created by 一介布衣 on 2020/6/4.
//  Copyright © 2020 一介布衣. All rights reserved.
//

#import <Foundation/Foundation.h>


#import "AppDelegate.h"

NS_ASSUME_NONNULL_BEGIN

@interface AppDelegate (CheckPermissions) <UIAlertViewDelegate>

@property (nonatomic, assign) BOOL openAppFromBackground;//YES:app从后台进入前台 NO:启动app进入
@property (nonatomic, strong) UIAlertView *networkAlertView;
@property (nonatomic, strong) UIAlertView *messageAlertView;
@property (nonatomic, assign) BOOL didBecomeActive;
@property (nonatomic, assign) UIBackgroundTaskIdentifier backgroundTaskId;//后台申请10分钟情况的ID
@property (nonatomic, assign) NSUInteger checkFlag;//1:gps 2:message 2:network

/**
 app进入前台
 */
- (void)applicationWillEnterForegroundWithCheckPermissions;

/**
 app进入后台
 */
- (void)applicationDidEnterBackgroundWithCheckPermissions;

/**
 app即将终结
 */
- (void)applicationWillTerminateWithCheckPermissions;

/**
 app将挂起
 */
- (void)applicationWillResignActiveWithCheckPermissions;

/**
 app复原
 */
- (void)applicationDidBecomeActiveWithCheckPermissions;

/**
 网络监听
 */
- (void)netWorkStatusListener;

/**
 全部检查
 */
- (void)checkAllPermissions;


@end

NS_ASSUME_NONNULL_END
